/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package metodos_estaticos_tema3;

import java.util.Arrays;
import java.util.Scanner;

/**
 *
 * @author Alex
 */
public class Vector {
    public static void fill (int v[],int x){
             int dos []=new int[8];
       
       Arrays.fill(dos, 3);
        int cont=0;
          
            for (int tmp: dos) {
               
              System.out.println("Valor Arrays: " +dos[tmp]+".");
            }
       
    }   

    public static void fill (int v[],int indicomienza, int inditermina, int x){ //relleno selectivo con metodo.
        for (int i = 0; i < v.length; i++) {
            
        
        Arrays.fill(v, indicomienza, inditermina, x); // array, indicie comienzo, indice termina, valor. 
    }
    
    
    }
    
    public static int [] mostrarVector(int v[]){
       int[] vector = new int[v.length];
		for (int i = 0; i<v.length; i++){
                    System.out.println(v[i]);
		}
		return vector;
        }
    
    public static int [] generarVector (int v[]){
        int w[]=new int[v.length];
        return w;
    }
   
    public static int[] generaVector18(int v[]){
      //vector 8 o 18.
        
        int w[]=new int[v.length];
        for(int i=0;i<v.length;i++)
        {
           if(i%2==0)
           {
               w[i]=v[i]+15;
           }
           else
           {
               w[i]=v[i];
           }
        }
        return w;
    }
    
    public static int [] ordenarVectorCreciente (int w){
      
        
         int [] v= {12,4,5,78,45,67,45,66,77,44};
          int pasada;
          int i;
           for (pasada = 1; pasada < v.length; pasada++) 
           {
               for (i = 0; i < (v.length-pasada); i++) {
                   if(v[i]>v[i]+1){
                       
                   }
               }
 
        }
        
        return v;
    }
    
    
    public static int[] leerVector(int taman)
     {
        Scanner tecaldo=new Scanner (System.in);
        String cad;
        int v[]=new int[taman];
        
        
        
        for (int i = 0; i < v.length; i++) {
            
            
        
        System.out.println("Dime el numero añadir al Vector: ");
         v[i]=metodos_estaticos_tema3.Leer.numEntero();
        } 
         return v; 
    
    }
    
}
    
    
    
    
    
    
    
    
    
    

